<html>
	<head>
		<title>{%$title%}</title>
		<base href="/Tpl/"/>
		<link href="Home/Themes/default/css/main.css" type="text/css" rel="stylesheet">
		
		
		<!-- Lib and g11n -->
		<script src='Libs/jquery-1.7.2.min.js'></script>
		<script src='Libs/jquery.ui.widget.js'></script>
		<script src='Libs/jquery.ui.tabs.js'></script>
		<script src='Libs/classes.js'></script>
		<script src='G11n/g11n.{%$lang|default='zh-cn'%}.js'></script>
		<script src='Views/html.compiled.js'></script>

		<!-- Widgets -->
		<script src='Home/Widgets/headerbar.js'></script>
		<script src='Home/Widgets/goodsitem.js'></script>
		<script src='Home/Widgets/logobar.js'></script>
		<script src='Home/Widgets/categoryview.js'></script>
		<script src='Home/Widgets/galleryview.js'></script>
		<script src='Home/Widgets/metroview.js'></script>
		<script src='Home/Widgets/commonview.js'></script>
		<script src='Home/Widgets/tabsview.js'></script>
	</head>
	<body class='main'>
		<!-- Header -->
		<div class='header'>
			<div class='bar'></div>

			<div class='logo-bar'></div>
		</div>

		<!-- Content -->
		<div class='content'>
			<div id='tabs-container'>
			</div>
			<a href='javascript:void(0)' id='create'>Click</a>

		</div>

		<!-- Footer -->
		<div class='footer'></div>
	</body>
</html>
<literal> 
<script type="text/javascript">
	$(function(){
		/*
		var headerBar2 = new HeaderBar(1, 2, $('div.bar'));
		headerBar2.create($('div.bar'));	

		console.debug(headerBar2._className);
		*/
		

		$('#create').click(function(){
		var goodsItem = new GoodsItem();
		goodsItem.create($('div.bar'));
		});

		var tabsView = new TabsView();
		tabsView.create( $('#tabs-container') );
		tabsView.addTab("Hello", new MetroView(), 'widget');
		tabsView.addTab("World");
		/*
		var tabs = $('#tabs').tabs();

		tabs.tabs('add', '#id', 'Hello');
		*/
		
		

		/*
		function templateString(str, vars)
		{
			var re = /\{%\\$[a-z0-9-]+%\}/gi;
			var items = str.match(re);
			for (var index in items)
			{
				var item = items[index];
				var key = item.substr(3, item.length - 5);
				str = str.replace(item, vars[key]);
			}
			return str;
		}
		*/

		/*
		console.debug( hj.templateString("<li class=\"fore1\" id=\"timed1\" clstag=\"homepage|keycount|home2012|15a\">
	<div class=\"countdown\" id=\"timer37\"></div>             
	<div class=\"p-img ld\">
		<a href=\"http://www.360buy.com/product/556403.html\" target=\"_blank\" title=\"\"><b class=\"pi pix1\" id=\"icon37\"><span>7.8</span><br>折</b><img src=\"http://img13.360buyimg.com/n3/g2/M02/01/01/rBEGEk-ZFpwIAAAAAAG6-t6jI40AAANOwPj_mwAAbsS506.jpg\" width=\"130\" height=\"130\" data-img=\"1\" alt=\"1699 抢最后100台(下单减100元)长虹32寸LED\"></a>
	</div>
	<div class=\"p-name\">
		<a href=\"http://www.360buy.com/product/556403.html\" title=\"\" target=\"_blank\"></a>
	</div>            
	<div class=\"p-price\"><span>{%$price%}</span><strong>￥1799.00</strong></div>
</li>", {'price':'促销价', 'b-d':'world'}) );
		*/
	});
</script>
</literal> 